import axios from "axios";

export default {
    numberAdd() {
        this.state.number++;
    },
    setAge(obj, val) {
        obj.age = val;
    },
    addPrice(obj, addPrice) {
        obj.price += Number.parseInt(addPrice);
    },
    getUserList(obj) {
        axios.get('https://cdn.liyanhui.com/data.json').then(result => {
            obj.userList = result.data;
            console.log(obj.userList)
        })
    }
}